<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%
    java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("yyyy-MM-dd");
    java.util.Date currentTime = new java.util.Date(); // 得到当前系统时间
    String date = formatter.format(currentTime);  // 将日期时间格式化
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
    String webSocketPath = request.getServerName() + ":" + request.getServerPort() + path;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <base href="<%=basePath%>">
    <title>数据诊断页面</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="武重,武汉理工,云平台">
    <meta http-equiv="description" content="数据诊断页面">

    <link rel="stylesheet" type="text/css" href="jquery/easyui1.4.2/themes/gray/easyui.css">
    <link rel="stylesheet" type="text/css" href="jquery/easyui1.4.2/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="css/assets/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="css/assets/css/ace.min.css"/>
    <link rel="stylesheet" href="css/assets/css/ace-rtl.min.css"/>
    <link rel="stylesheet" href="css/assets/css/ace-skins.min.css"/>

    <script type="text/javascript" src="jquery/jquery.min.js"></script>
    <script type="text/javascript" src="jquery/easyui1.4.2/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="jquery/easyui1.4.2/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="jquery/underscore-min.js"></script>

    <link href="//cdn.bootcss.com/bootstrap-table/1.11.1/bootstrap-table.min.css" rel="stylesheet"/>
    <script src="//cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
    <script src="//cdn.bootcss.com/bootstrap-table/1.11.1/bootstrap-table.min.js"></script>
    <script src="//cdn.bootcss.com/bootstrap-table/1.11.1/locale/bootstrap-table-zh-CN.min.js"></script>
</head>

<body style="background-color:white;margin-top:0px;font: 16px/1.5 'Helvetica Neue',Helvetica,Arial,'Microsoft Yahei','Hiragino Sans GB','Heiti SC','WenQuanYiMicro Hei',sans-serif;">
<div class="widget-box" style="margin:16px 24px;padding-bottom:15px;text-align:center;">
    <div class="widget-header header-color-blue" style="border-top-left-radius:10px;border-top-right-radius:10px;">
        <h4 style="color:white;font-family:'Microsoft Yahei',sans-serif;">传感器每天监测汇报</h4>
    </div>
    <div class="widget-body" style="border-bottom-right-radius:10px;border-bottom-left-radius:10px;min-height:500px;">
        <div class="widget-main">
            <div class="row">
                <p>环境温度、电类传感器、FBG传感器<%=date%>情况汇报</p>
                <div style="margin-left:10px;margin-right:10px;">
                    <table id="table"></table>
                </div>
            </div>
        </div>
    </div>
    受算法设计者水平所限，监测结果仅供参考。——蒋方正
</div>

<script type="text/javascript">
    $("#table").bootstrapTable({
        url: "historysearch/diagnosissensor?date=<%=date%>",
        cache: false,
        striped: true,
        sortName: 'id',
        sortOrder: 'asc',
        columns: [
            {
                field: 'type',
                title: '传感器类别',
                align: 'center',
                valign: 'middle'
            }, {
                field: 'id',
                title: '传感器编号',
                align: 'center',
                valign: 'middle'
            },
            {
                field: 'result',
                title: '监测结果',
                align: 'center',
                valign: 'middle'
            }
        ],
        onLoadSuccess: function () {
            console.info("加载成功")
        },
        onLoadError: function () {
            console.info("加载数据失败")
        }
    })</script>
</body>
</html>